#include <limits.h>
#include <math.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>

int minimizedMaximum(int n, int* quantities, int quantitiesSize);
int check(int mid, int* quantities, int quantitiesSize, int n);

int main()
{
	return 0;
}

int minimizedMaximum(int n, int* quantities, int quantitiesSize)
{
	int left = 0, right = 1e5 + 1;
	while (left < right) {
		int mid = left + (right - left >> 1);
		if (check(mid, quantities, quantitiesSize, n))
			right = mid;
		else
			left = mid + 1;
	}

	return left;
}

int check(int mid, int* quantities, int quantitiesSize, int n)
{
	if (mid == 0)
		return false;

	int cnt = 0;
	for (int i = 0; i < quantitiesSize; i++)
		cnt += (quantities[i] + mid - 1) / mid;
	return cnt <= n;
}
